package com.eshore.norm.pojo.po;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author HJ
 * @date 2024/1/22 9:37
 */
@NoArgsConstructor
@Data
public class NormClusterOverviewPO {
    @JsonProperty("message")
    private String message;
    @JsonProperty("content")
    private List<ContentDTO> content;
    @JsonProperty("status")
    private Integer status;
    @JsonProperty("total")
    private Integer total;
    @JsonProperty("timestamp")
    private String timestamp;

    @NoArgsConstructor
    @Data
    public static class ContentDTO {
        @JsonProperty("cpu")
        private Integer cpu;
        @JsonProperty("cpu_ratio")
        private Double cpuRatio;
        @JsonProperty("cpu_allocate_ratio")
        private Double cpuAllocateRatio;
        @JsonProperty("memory")
        private Double memory;
        @JsonProperty("memory_ratio")
        private Double memoryRatio;
        @JsonProperty("memory_allocate_ratio")
        private Double memoryAllocateRatio;
        @JsonProperty("vm_count")
        private Integer vmCount;
        @JsonProperty("running_count")
        private Integer runningCount;
        @JsonProperty("azId")
        private String azId;
        @JsonProperty("azName")
        private String azName;
        @JsonProperty("resourcePoolName")
        private String resourcePoolName;
        @JsonProperty("storages")
        private List<StoragesDTO> storages;

        @NoArgsConstructor
        @Data
        public static class StoragesDTO {
            @JsonProperty("storage_id")
            private String storageId;
            @JsonProperty("storage_name")
            private String storageName;
            @JsonProperty("storage_type")
            private String storageType;
            @JsonProperty("storage")
            private Integer storage;
            @JsonProperty("storage_ratio")
            private Double storageRatio;
            @JsonProperty("storage_allocate_ratio")
            private Double storageAllocateRatio;
        }
    }


//
//    @JsonProperty("content")
//    private List<ContentDTO> content;
//    @JsonProperty("message")
//    private String message;
//    @JsonProperty("status")
//    private Integer status;
//    @JsonProperty("timestamp")
//    private String timestamp;
//    @JsonProperty("total")
//    private Integer total;
//
//    @NoArgsConstructor
//    @Data
//    public static class ContentDTO {
//        @JsonProperty("azId")
//        private String azId;
//        @JsonProperty("azName")
//        private String azName;
//        @JsonProperty("cpu")
//        private Integer cpu;
//        @JsonProperty("cpu_allocate_ratio")
//        private Double cpuAllocateRatio;
//        @JsonProperty("cpu_ratio")
//        private Double cpuRatio;
//        @JsonProperty("memory")
//        private Integer memory;
//        @JsonProperty("memory_allocate_ratio")
//        private Double memoryAllocateRatio;
//        @JsonProperty("memory_ratio")
//        private Double memoryRatio;
//        @JsonProperty("running_count")
//        private Integer runningCount;
//        @JsonProperty("storages")
//        private List<StoragesDTO> storages;
//        @JsonProperty("vm_count")
//        private Integer vmCount;
//
//        @NoArgsConstructor
//        @Data
//        public static class StoragesDTO {
//            @JsonProperty("storage")
//            private Double storage;
//            @JsonProperty("storage_allocate_ratio")
//            private Double storageAllocateRatio;
//            @JsonProperty("storage_id")
//            private String storageId;
//            @JsonProperty("storage_name")
//            private String storageName;
//            @JsonProperty("storage_ratio")
//            private Double storageRatio;
//            @JsonProperty("storage_type")
//            private String storageType;
//        }
//    }
}
